home *** CD-ROM | disk | FTP | other *** search
- Path: airdmhor.gen.nz!not-for-mail
- From: gumboot@airdmhor.gen.nz (Simon Hosie)
- Newsgroups: comp.lang.c
- Subject: Re: division problem
- Date: 2 Feb 1996 04:28:26 +1300
- Organization: Airdmhor
- Message-ID: <4eqm6q$bdk@airdmhor.gen.nz>
- References: <31097D77.11AA@rain.org> <26JAN199622082450@erich.triumf.ca> <4eh246$u6h@airdmhor.gen.nz> <4ej4ha$66@fountain.mindlink.net> <DLzvGG.2rn@uns.bris.ac.uk> <4emuba$1mo@fountain.mindlink.net> <823118692snz@genesis.demon.co.uk>
- NNTP-Posting-Host: localhost.gen.nz
- X-Newsreader: TIN [version 1.2 PL2]
-
- > Still no need to use floating point,
- > celcius = ((fahrenheit - 32) * 5 + 4) / 9
-
- genew@mindlink.bc.ca "Gene Wirchenko" writes:
- > Let's assume that you had never run across fahrenheit to celsius
- > conversion before (because the above could just as easily be a case of
- > converting flibbles to meeblesnauzers).
- >
- > Can you derive the ORIGINAL formula for conversion of F to C?
- >
- > If yes, how? Because you don't know what the 4 is for.
-
- Lawrence Kirby:
- > Maybe not but its effect is clearly one of rounding. Perhaps it would be
- > clearer to specify it as (9/2), perhaps not.
-
- It's not perfect rounding (you should have seen my examply by now). And
- you can get the original formula back as long as you know that you're
- working with integers.
-
-
- genew@mindlink.bc.ca "Gene Wirchenko" writes:
- > If no, then it's unclear code, isn't it?
-
- Lawrence Kirby:
- > How would you express it more clearly?
-
- I'd just put a comment next to it if I thought it was necessary.
-